package com.mariusz.managers;

import static org.junit.Assert.*;

import java.io.IOException;

import org.junit.Test;

import com.mariusz.data.DataContainer;
import com.mariusz.exceptions.ReadDataException;

public class DataManagerTest {

	@Test
	public void testPersistData() {
		try {
		DataContainer container = new DataContainer();
		DataManager m = DataManager.getInstance();
		m.setContainer(container);
		m.setMockData();
	
		
			m.persistData();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	@Test
	public void testRetriveData() {

		DataManager m = DataManager.getInstance();
		try {
			m.retriveData();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ReadDataException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
